package day10stringbuilderdemo;

public class StringBuilderDemo2 {
    public static void main(String[] args) {
        //创建对象 sb ---容器
        StringBuilder sb = new StringBuilder("abc");

        //链式编程
        int len = sb.append("aaa").append("bbb").append("ccc").reverse().length();
        System.out.println(len);

        //拼接数组---字符串
       /* sb.append(123);
        sb.append(1.3);
        sb.append(true);
        System.out.println(sb);*/
        //反转数组---字符串
        sb.reverse();
        System.out.println(sb);
        //获取数组长度---字符串
        //int len = sb.length();
        System.out.println(len);



    }
}
